@layout("/common/_container.html"){
<style>
    ul{  padding: 0;  }
    .nav_ul{  border-bottom: 5px solid #30add2;  margin-bottom: 20px;  }
    .nav_ul>li>a{  color: #565656;  border: 1px solid #dddddd;  }
    .nav_table{  margin-top: 10px;  }
    .ul_flex {  display: flex;  padding: 0;  }
    .ul_flex > li {  flex: 1;  }
    .ul_flex ul {  padding: 0;  }
    .ul_flex ul > li {  line-height: 52px;  }
    .ul_flex span {  display: inline-block;  width: 110px;  }
    .home_box{  border: 1px solid white;  border-radius: 5px;  overflow: hidden;  padding-bottom: 30px;  }
    .nav-tabs > li.active > a,
    .nav-tabs > li.active > a:hover,
    .nav-tabs > li.active > a:focus {
        background: #30add2;
        border-bottom:1px solid #30add2;
        color: white;
    }
    .select_styles {
        line-height: 35px;
        width: 60%;
        height: 39px;
        border-radius: 3px;
        border: none;
        padding-left: 10px;
        -webkit-appearance: none;
    }
    .modify {
        height: 39px;
        border: none;
        width: 60%;
        border-radius: 3px;
        padding-left: 10px;
    }
    .modify1 {
        height: 39px;
        border: none;
        width: 60%;
        border-radius: 3px;
        padding-left: 10px;
    }
    .select_styles1 {  line-height: 35px;  width: 60%;  height: 39px;  border-radius: 3px;  border: none;  padding-left: 10px;  -webkit-appearance: none;  readOnly:readOnly;  }
</style>
<div class="ibox float-e-margins ">
    <div class="ibox-content" id="addVisitedInfoForm">
        <div id="isDealInfoForm">
            <div style="display: none">
                <input id="arrears" value="0">
                <input type="hidden" id="sortMap" value="">
                <input type="hidden" id="id" value="${consultantInfo.id}">
                <input type="hidden" id="customerId" value="${customerId}">
                <input type="hidden" id="roleName" value="${roleName}">
                <input type="hidden" id="reservationsId" value="${consultantInfo.reservationsId}">
                <button type="button" class="btn" id="cancel" onclick="addVisitedInfoDlg.close()">取消</button>
                <input type="hidden" id="customerSexValue" value="${consultantInfo.sex}">
            </div>
            <div class="row" style="background: #f7f7f7;border: 1px solid #dddddd;border-radius: 3px;">
                <p style="margin-top: 25px;">
                    <span style="margin-left: 10px;font-size: 2em;font-weight: bolder;">${consultantInfo.customerName}</span>
                    <span style="margin-left: 2%;">${consultantInfo.customerAge}</span>
                    <span style="margin-left: 1%">${consultantInfo.sex}
                        <!--<select style="border: none;-webkit-appearance: none;background: #f7f7f7" id="customerSex" name="customerSex">-->
                            <!--<option value="1">男</option>-->
                            <!--<option value="2">女</option>-->
                        <!--</select>-->
                    </span>
                    <span style="margin-left: 4%;">电话：${consultantInfo.customerPhone}</span>
                    <span style="margin-left: 4%;">病历：${consultantInfo.medicalRecordNumber}</span>
                    <span style="margin-left: 4%;">现场TC：${consultantInfo.tcName}</span>
                </p>
            </div>
            <div class="row">
                <div class="nav_table" id="consultantInfoForm">
                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs nav_ul" role="tablist" id="navBox">
                        <li role="presentation" class="active onRecord"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">患者信息</a></li>
                        <li role="presentation"><a href="#doctor" class="arrived" aria-controls="doctor" role="tab" data-toggle="tab">看诊记录</a></li>
                        <li role="presentation"><a href="#dealed" class="arrived" aria-controls="dealed" role="tab" data-toggle="tab">成交记录</a></li>
                        <li role="presentation"><a href="#visit" class="arrived" aria-controls="visit" role="tab" data-toggle="tab">就诊记录</a></li>
                    </ul>
                    <!-- Tab panes -->
                    <div class="tab-content content_box" id="contentBox">

                        <div role="tabpanel" class="tab-pane active onRecord" id="home" >
                            @layout("/tcCenter/consultant/consultant_informations.html"){
                            @}
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="doctor">
                            <div class="home_box" style="background: #f7f7f7;position: relative">
                                <div style="background: #cccccc;width: 7px;position: absolute;top: 50px;left: 3%;bottom: 0;">
                                    <span class="glyphicon glyphicon-record" style="color:#30add1;
                                    font-size: 4em;margin: -30px 0 0 -21px;"></span>
                                </div>
                                <div style="width: 54%;margin-left: 7%">
                                    <#sortDiagnosisDetail  id="sortDiagnosisDetail" list="${consultantInfoList}"/>
                                </div>
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="dealed">
                            <span style="font-size: 20px;color: #333333; margin-left: 25px;">实收总额：<span style="color: black;font-weight: bold;">${customerInfo.actualAccountBalance}</span></span>
                            <span style="font-size: 20px;color: #333333;">欠费总额：<span style="color: red;font-weight: bold;">${customerInfo.accountArrears}</span></span>

                            <div class="home_box" style="position: relative">
                                <div style="text-align: center;border-top: 3px solid #00a6c9;border-bottom: 3px solid #00a6c9;">
                                    <#doctor_seeDiagnosis  id="doctor_seeDiagnosis" list="${payServiceInfoList}"/>
                                </div>
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane arrived" id="visit">
                            <div class="home_box" style="background: #f7f7f7;position: relative">
                                <div style="background: #cccccc;width: 7px;position: absolute;top: 50px;left: 3%;bottom: 0;">
                                    <span class="glyphicon glyphicon-record" style="color:#30add1;
                                    font-size: 4em;margin: -30px 0 0 -21px;"></span>
                                </div>
                                <div style="width: 54%;margin-left: 7%">
                                    <#sortVisitDetail  id="sortVisitDetail" list="${customerInfoList}"/>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<link rel="stylesheet" href="${ctxPath}/static/css/jqui/jquery-ui.min.css">
<script src="${ctxPath}/static/js/jquery-ui.min.js"></script>
<script src="${ctxPath}/static/modular/tcCenter/consultant/addVisited_info.js"></script>

<script>

    $(function () {
        var arrears = document.getElementsByClassName("arrears");
        for(var i=0;i<arrears.length;i++){
            if(arrears[i].innerHTML == 0){
                arrears[i].style.color = "#666666"
            }
        }
        $.post(Feng.ctxPath + "/tc/getList", function (data) {
            var txt = '<option value="">--请选择现场TC--</option>';
            for (var i = 0; i < data.length; i++) {
                txt += '<option value="' + data[i].tcName + '">' + data[i].tcName + '</option>';
            }
            document.getElementById('fieldTc').innerHTML = txt;
            //状态单选
            var seletefieldTc = $('#fieldTcValue').val();
            if (seletefieldTc != "") {
                $("#fieldTc option[value=" + seletefieldTc + "]").attr("selected", "selected");
            }
        }, "json");

        //初始化下拉预约项目列表
        $.post(Feng.ctxPath + "/payService/getList", function (data) {
            var txt = '<option value="">--请选择预约项目--</option>';
            for (var i = 0; i < data.length; i++) {
                txt += '<option value="' + data[i].department + '">' + data[i].department + '</option>';
            }
            document.getElementById('appointmentPayService').innerHTML = txt;
            //状态单选
            var seletepayservicename = $('#payservicenameValue').val();
            if (seletepayservicename != "") {
                seletepayservicename = seletepayservicename.split(",")[0];
                console.log(seletepayservicename);
                $("#appointmentPayService option[value=" + seletepayservicename + "]").attr("selected", "selected");
            }
        }, "json");

        //初始化下拉消费能力列表
        $.post(Feng.ctxPath + "/consumAbility/getList", function (data) {
            var txt = '<option value="">--请选择消费能力--</option>';
            for (var i = 0; i < data.length; i++) {
                txt += '<option value="' + data[i].consum_ability + '">' + data[i].consum_ability + '</option>';
            }
            document.getElementById('consumAbility').innerHTML = txt;
            //状态单选
            var seleteconsumAbility = $('#consumAbilityValue').val();
            if (seleteconsumAbility != "") {
                $("#consumAbility option[value=" + seleteconsumAbility + "]").attr("selected", "selected");
            }
        }, "json");

        //初始化下拉职业列表
        $.post(Feng.ctxPath + "/occupation/getList", function (data) {
            var txt = '<option value="">--请选择职业--</option>';
            for (var i = 0; i < data.length; i++) {
                txt += '<option value="' + data[i].occupation + '">' + data[i].occupation + '</option>';
            }
            document.getElementById('occupation').innerHTML = txt;
            //状态单选
            var seleteoccupation = $('#occupationValue').val();
            if (seleteoccupation != "") {
                $("#occupation option[value=" + seleteoccupation + "]").attr("selected", "selected");
            }
        }, "json");

        var seletecustomerSex = $('#customerSexValue').val();
        if ($('#seletecustomerSex').val() != "") {
            $("#customerSex option[value=" + seletecustomerSex + "]").attr("selected", "selected");
        }
        if ($('#seletecustomerSex').val() != "") {
            $("#select1 option[value=" + seletecustomerSex + "]").attr("selected", "selected");
        }

    });



    //补欠款
    payQianKuan = function (customerId, reservationsId, operationTime) {
        var ids =customerId + "," + reservationsId + ","+  operationTime;
        var index = layer.open({
            type: 2,
            title: '补欠款',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/payKuan/' + ids
        });
        this.layerIndex = index;
    };

    //退款
    refundMoney  = function (customerId, reservationsId, operationTime) {
        var parpams =customerId + "," + reservationsId + ","+  operationTime;
        var index = layer.open({
            type: 2,
            title: '退款',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/consultant/refundMoneys/' + parpams
        });
        this.layerIndex = index;
    };

    //医生修改
    modify_ys = function (customerId,id2,reservationsId,operationTime) {
        var cir = customerId + "," + id2+ "," + reservationsId+ "," + operationTime;
        var index = layer.open({
            type: 2,
            title: '修改',
            area: ['90%', '90%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/payService/modifying_data/' + cir
        });
        this.layerIndex = index;
    };

    //就诊记录 修改
    appointment = function (customerId,reservationsId,doctor) {
        var cid = customerId + "," + reservationsId + "," + doctor;
        console.log(cid);
        var index = layer.open({
            type: 2,
            title: '新建预约',
            area: ['60%', '100%'], //宽高
            fix: true, //不固定
            maxmin: true,
            content: Feng.ctxPath + '/doctorLooked/doctor_update_appointment/' + cid
        });
        this.layerIndex = index;
    };

    //成交记录下拉箭头
    $(".showDetail").click(function () {
        $(this).parent().siblings().toggle();
        $(this).children().toggle();
    })

</script>
@}
